package com.tanhua.app.interceptor;

import com.tanhua.model.pojo.User;

public class UserThreadLocal {
    public static ThreadLocal<User> threadLocal=new ThreadLocal<User>() ;

    public static void setThreadLocal(User user){
        threadLocal.set(user);
    }

    public static User getUser(){
        User user = threadLocal.get();
        return user;
    }

    public static Long getid(){
        Long id = threadLocal.get().getId();
        return id;
    }
    public static String getMobile(){
        String mobile = threadLocal.get().getMobile();
        return mobile;
    }
    public static void remove(){
        threadLocal.remove();
    }
}
